<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class MemoryRealm</title>
			<link rel="stylesheet" href="../../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class MemoryRealm</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">MemoryRealm class</p>
<p class="description"><p>Simple implementation of <strong>Realm</strong> that reads an XML file to configure  the valid users, passwords, and roles.  The file format (and default file  location) are identical to those currently supported by Tomcat 3.X.  &lt;p&gt;
 &lt;strong&gt;IMPLEMENTATION NOTE&lt;/strong&gt;: It is assumed that the in-memory  collection representing our defined users (and their roles) is initialized  at application startup and never modified again.  Therefore, no thread  synchronization is performed around accesses to the principals collection.</p></p>
		<p class="notes">
			Located in <a class="field" href="_aas---realm---MemoryRealm.php.html">/aas/realm/MemoryRealm.php</a> (line <span class="field">50</span>)
		</p>
		
				
		<pre><a href="../../php-aas/realm/RealmBase.html">RealmBase</a>
   |
   --MemoryRealm</pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																								<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$name" title="details" class="var-name">$name</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																				
												<div class="method-definition">
											<span class="method-result">MemoryRealm</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#authenticate" title="details" class="method-name">authenticate</a>
											(<span class="var-type">username</span>&nbsp;<span class="var-name">$username</span>, <span class="var-type">credentials</span>&nbsp;<span class="var-name">$credentials</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#getName" title="details" class="method-name">getName</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#getPassword" title="details" class="method-name">getPassword</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$username</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#getPathname" title="details" class="method-name">getPathname</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#getPrincipal" title="details" class="method-name">getPrincipal</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$username</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setPathname" title="details" class="method-name">setPathname</a>
											(<span class="var-type">pathname</span>&nbsp;<span class="var-name">$pathname</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#start" title="details" class="method-name">start</a>
										()
									</div>
								</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="var$name" id="$name"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$name</span>
			 = <span class="var-default"> &quot;MemoryRealm&quot;</span>			(line <span class="line-number">59</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Descriptive information about this Realm implementation.</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
							<h4>Inherited Variables</h4>
				<A NAME='inherited_vars'><!-- --></A>
									<p>Inherited from <span class="classname"><a href="../../php-aas/realm/RealmBase.html">RealmBase</a></span></p>
					<blockquote>
													<span class="var-title">
								<span class="var-name"><a href="../../php-aas/realm/RealmBase.html#var$container">RealmBase::$container</a></span><br>
							</span>
													<span class="var-title">
								<span class="var-name"><a href="../../php-aas/realm/RealmBase.html#var$digest">RealmBase::$digest</a></span><br>
							</span>
													<span class="var-title">
								<span class="var-name"><a href="../../php-aas/realm/RealmBase.html#var$md">RealmBase::$md</a></span><br>
							</span>
													<span class="var-title">
								<span class="var-name"><a href="../../php-aas/realm/RealmBase.html#var$started">RealmBase::$started</a></span><br>
							</span>
											</blockquote> 
										
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>

<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">75</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">MemoryRealm</span>
		<span class="method-name">
			__construct
		</span>
				()
			</div>
	
		
			<hr class="separator" />
		<div class="notes">Redefinition of:</div>
		<dl>
			<dt><a href="../../php-aas/realm/RealmBase.html#method__construct">RealmBase::__construct()</a></dt>
					</dl>
			
	</div>
<a name="methodauthenticate" id="authenticate"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">authenticate</span> (line <span class="line-number">117</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return the Principal associated with the specified username and  credentials, if there is one; otherwise return <div class="src-code"><ol><li><div class="src-line"><span class="src-id">null</span></div></li>
</ol></div>.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			authenticate
		</span>
					(<span class="var-type">username</span>&nbsp;<span class="var-name">$username</span>, <span class="var-type">credentials</span>&nbsp;<span class="var-name">$credentials</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">username</span>
				<span class="var-name">$username</span><span class="var-description">: Username of the Principal to look up</span>			</li>
					<li>
				<span class="var-type">credentials</span>
				<span class="var-name">$credentials</span><span class="var-description">: Password or other credentials to use in   authenticating this username</span>			</li>
				</ul>
		
			<hr class="separator" />
		<div class="notes">Redefinition of:</div>
		<dl>
			<dt><a href="../../php-aas/realm/RealmBase.html#methodauthenticate">RealmBase::authenticate()</a></dt>
						<dd>Return the Principal associated with the specified username and  credentials, if there is one; otherwise return <div class="src-code"><ol><li><div class="src-line"><span class="src-id">null</span></div></li>
</ol></div>.</dd>
					</dl>
			
	</div>
<a name="methodgetName" id="getName"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getName</span> (line <span class="line-number">190</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return a short name for this Realm implementation.</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getName
		</span>
				()
			</div>
	
		
			<hr class="separator" />
		<div class="notes">Redefinition of:</div>
		<dl>
			<dt><a href="../../php-aas/realm/RealmBase.html#methodgetName">RealmBase::getName()</a></dt>
						<dd>Return a short name for this Realm implementation, for use in  log messages.</dd>
					</dl>
			
	</div>
<a name="methodgetPassword" id="getPassword"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getPassword</span> (line <span class="line-number">198</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return the password associated with the given principal's user name.</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getPassword
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$username</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$username</span>			</li>
				</ul>
		
			<hr class="separator" />
		<div class="notes">Redefinition of:</div>
		<dl>
			<dt><a href="../../php-aas/realm/RealmBase.html#methodgetPassword">RealmBase::getPassword()</a></dt>
						<dd>Return the password associated with the given principal's user name.</dd>
					</dl>
			
	</div>
<a name="methodgetPathname" id="getPathname"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getPathname</span> (line <span class="line-number">86</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return the pathname of our XML file containing user definitions.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getPathname
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetPrincipal" id="getPrincipal"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getPrincipal</span> (line <span class="line-number">213</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return the Principal associated with the given user name.</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getPrincipal
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$username</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$username</span>			</li>
				</ul>
		
			<hr class="separator" />
		<div class="notes">Redefinition of:</div>
		<dl>
			<dt><a href="../../php-aas/realm/RealmBase.html#methodgetPrincipal">RealmBase::getPrincipal()</a></dt>
						<dd>Return the Principal associated with the given user name.</dd>
					</dl>
			
	</div>
<a name="methodsetPathname" id="setPathname"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">setPathname</span> (line <span class="line-number">99</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set the pathname of our XML file containing user definitions.  If a  relative pathname is specified, it is resolved against &quot;catalina.base&quot;.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setPathname
		</span>
					(<span class="var-type">pathname</span>&nbsp;<span class="var-name">$pathname</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">pathname</span>
				<span class="var-name">$pathname</span><span class="var-description">: The new pathname</span>			</li>
				</ul>
		
			
	</div>
<a name="methodstart" id="start"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">start</span> (line <span class="line-number">229</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Prepare for active use of the public methods of this Component.</p>
	<ul class="tags">
				<li><span class="field">exception:</span> LifecycleException if this component detects a fatal error   that prevents it from being started</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			start
		</span>
				()
			</div>
	
		
			
	</div>
							<h4>Inherited Methods</h4>
				<a name='inherited_methods'><!-- --></a>	
									<!-- =========== Summary =========== -->
					<p>Inherited From <span class="classname"><a href="../../php-aas/realm/RealmBase.html">RealmBase</a></span></p>
					<blockquote>
													<span class="method-name"><a href="../../php-aas/realm/RealmBase.html#method__construct">RealmBase::__construct()</a></span><br>
													<span class="method-name"><a href="../../php-aas/realm/RealmBase.html#methodauthenticate">RealmBase::authenticate()</a></span><br>
													<span class="method-name"><a href="../../php-aas/realm/RealmBase.html#methoddigest">RealmBase::digest()</a></span><br>
													<span class="method-name"><a href="../../php-aas/realm/RealmBase.html#methodgetApplicationContext">RealmBase::getApplicationContext()</a></span><br>
													<span class="method-name"><a href="../../php-aas/realm/RealmBase.html#methodgetContainer">RealmBase::getContainer()</a></span><br>
													<span class="method-name"><a href="../../php-aas/realm/RealmBase.html#methodgetDigest">RealmBase::getDigest()</a></span><br>
													<span class="method-name"><a href="../../php-aas/realm/RealmBase.html#methodgetName">RealmBase::getName()</a></span><br>
													<span class="method-name"><a href="../../php-aas/realm/RealmBase.html#methodgetPassword">RealmBase::getPassword()</a></span><br>
													<span class="method-name"><a href="../../php-aas/realm/RealmBase.html#methodgetPrincipal">RealmBase::getPrincipal()</a></span><br>
													<span class="method-name"><a href="../../php-aas/realm/RealmBase.html#methodgetValidate">RealmBase::getValidate()</a></span><br>
													<span class="method-name"><a href="../../php-aas/realm/RealmBase.html#methodhasMessageDigest">RealmBase::hasMessageDigest()</a></span><br>
													<span class="method-name"><a href="../../php-aas/realm/RealmBase.html#methodhasRole">RealmBase::hasRole()</a></span><br>
													<span class="method-name"><a href="../../php-aas/realm/RealmBase.html#methodsetApplicationContext">RealmBase::setApplicationContext()</a></span><br>
													<span class="method-name"><a href="../../php-aas/realm/RealmBase.html#methodsetContainer">RealmBase::setContainer()</a></span><br>
													<span class="method-name"><a href="../../php-aas/realm/RealmBase.html#methodsetDigest">RealmBase::setDigest()</a></span><br>
													<span class="method-name"><a href="../../php-aas/realm/RealmBase.html#methodsetValidate">RealmBase::setValidate()</a></span><br>
											</blockquote>
										
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Sat, 09 Feb 2008 11:57:32 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.0</a>
	</p>
	</div></body>
</html>